<?php

class loginView extends View {

	function __construct(){
		parent::__construct();
	}

	public function showLogin() {
		GLOBAL $USE_JSON;
		if($USE_JSON) {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('user/login_json.tpl');
		}
		else {
			$this->setTemplate('user/login.tpl');
		}
		$this->show();
	}

	public function showLoginStatus() {
		GLOBAL $USE_JSON;
		if ($USE_JSON)   {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('user/loginstatus_json.tpl');
		}
		else{
			$this->setTemplate('user/loginstatus.tpl');
		}
		$this->show();
	}

	public function showNotLoggedin() {
		GLOBAL $USE_JSON;
		if ($USE_JSON)   {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('user/mustlogin_json.tpl');
		}
		else{
			$this->setTemplate('user/mustlogin.tpl');
		}
		$this->show();
	}

	public function showLogout() {
		GLOBAL $USE_JSON;
		if ($USE_JSON)   {
			$this->setRenderType(VS_PLUGIN);
			$this->setTemplate('user/logout_json.tpl');
		}
		else{
			$this->setTemplate('user/logout.tpl');
		}

		$this->show();
	}
}
?>